﻿@model IEnumerable<SportMeetingPlanner.Models.Sport>
@{
    ViewBag.Title = "Sports";
}
<br />
<div class="section">
    <table class="listTable" cellspacing="0">
        @foreach (SportMeetingPlanner.Models.Sport item in Model)
        {
            <tr class="link">
                <td class="leftColumn">@Html.ActionLink(@item.Name, "Index", "Meeting", new { sportId = item.SportId }, null)
                </td>
            </tr>
        }
    </table>
</div>
@if (User.Identity.IsAuthenticated && ViewBag.IsAdmin)
{
    <br />
    <div class="section">
        <table class="listTable" cellspacing="0">
            <tr class="link">
                <td class="leftColumn">
                    @Html.ActionLink("Manage sports", "Index", "SportManager")
                </td>
            </tr>
            <tr class="link">
                <td class="leftColumn">
                    @Html.ActionLink("Manage users", "Index", "UserManager")
                </td>
            </tr>
        </table>
    </div>
}